package com.hulk.dryad.web.api.vo;



import com.hulk.dryad.web.api.vo.base.ReqVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author  lqx
 * @date 2020/10/20
 * 客户注册req
 */
@ApiModel
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class CustomerRegisterReqVO extends ReqVO {
    /**
     * 登录用户名
     */
    @NotBlank(message = "登录用户名不能为空;")
    @ApiModelProperty(value = "登录用户名", required = true)
    private String loginNo;
    /**
     * 客户姓名
     */
    @NotBlank(message = "客户姓名不能为空;")
    @ApiModelProperty(value = "客户姓名", required = true)
    @Length(min = 1, max = 32, message = "客户姓名长度请保证在32位以内;")
    private String name;
    /**
     * 客户别名
     */
    @ApiModelProperty(value = "客户别名", required = false)
    @Length(min = 1, max = 32, message = "客户别名非法,长度不正确;")
    private String nickName;
    /**
     * 证件类型
     */
    @ApiModelProperty(value = "证件类型", required = false)
    private String certType;
    /**
     * 证件编号
     */
    @ApiModelProperty(value = "证件编号", required = false)
    private String certNo;
    /**
     * 证件有效开始日期
     */
    @ApiModelProperty(value = "证件有效开始日期", required = false)
    private String certStartDate;
    /**
     * 证件有效结束日期
     */
    @ApiModelProperty(value = "证件有效结束日期", required = false)
    private String certEndDate;
    /**
     * 登录密码
     */
	@ApiModelProperty(value = "登录密码", required = true)
    @NotBlank(message = "登录密码不能为空;")
    @Length(min = 5, message = "密码复杂度不够;")
	@ToString.Exclude
    private String loginPwd;
    /**
     * 验证码
     */
    @ApiModelProperty(value = "验证码", required = false)
    private String checkCode;
    /**
     * 终端序列号
     */
    @ApiModelProperty(value = "终端序列号", required = false)
    private String imei;
    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称", required = false)
    private String deviceName;
    /**
     * 社交授权码
     */
    @ApiModelProperty(value = "社交授权码", required = true)
    private String socialCode;
    /**
     * 社交类型
     */
    @ApiModelProperty(value = "社交类型", required = true)
    private String socialType;

    /**
     * 注册渠道
     */
    @NotBlank(message = "注册渠道不能为空;")
    @Pattern(regexp = "WEB|APP|OTHER", message = "注册渠道取值不正确;")
    @ApiModelProperty(value = "注册渠道", required = true)
    private String channel;
}
